//
//  KindsCollectionViewCell.m
//  OpenEyes
//
//  Created by apple on 15/8/10.
//  Copyright (c) 2015年 袁阿迅. All rights reserved.
//

#import "KindsCollectionViewCell.h"

@implementation KindsCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        _backView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.contentView.bounds.size.width, self.contentView.bounds.size.height)];
        _backView.backgroundColor = [UIColor greenColor];
        [self.contentView addSubview:_backView];
        
        _view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.contentView.bounds.size.width, self.contentView.bounds.size.height)];
        _view.backgroundColor= [UIColor grayColor];
        _view.alpha = 0.6;
        [self.contentView addSubview:_view];
        
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.contentView.bounds.size.width, self.contentView.bounds.size.height)];
        _titleLabel.textAlignment = NSTextAlignmentCenter;
        _titleLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:23];
        _titleLabel.textColor = [UIColor whiteColor];
        
        [_view addSubview:_titleLabel];
        
        // 添加长按手势
        UILongPressGestureRecognizer *longPree=[[UILongPressGestureRecognizer alloc]initWithTarget:self action:@selector(longPressAction:)];
        [self.contentView addGestureRecognizer:longPree];
        
    }
    return self;
}

- (void)longPressAction:(UILongPressGestureRecognizer *)sendValue
{
    
}

@end
